Marking Slices and Modifying Image Stacks
If unrepresentative slices are present within volumetric image data, the use of some analysis tools may be restricted. For example, an image slice with major stains might significantly affect the histogram of the intensity distribution and prevent the correct evaluation of automatic thresholding for segmentation. Removing the slice or replacing it with representative information taken from the closest slices may solve this problem. Unrepresentative slices might also cause problems for segmentation algorithms that assume continuity in the direction of slices.
Functions implemented for modifying unrepresentative slices in an image stack include interpolating slices (see Interpolating Image Slices), copying slices (see Copying Marked Slices), and removing slices (see Removing Image Slices). If required, you can also extract a new dataset from marked slices (see Extracting New Images from Marked Slices).
The options for marking image slices are available in the 2D view pop-up menu, shown below.
2D view pop-up menu
You can create key images within an image stack by checking the Marked Slice box, which appears at the bottom right of image plane views of selected datasets.
- Right-click the image plane view of the required data and then choose Show Marked Slices Indicator in the pop-up menu.
If the Image Plane view is not available in the scene, right-click a view and then choose Image Plane in the pop-up menu.
- Do any of the following:
- Click the Marked Slice box for each key image that you need to create.

- Right-click the view and then choose Mark All Slices in the pop-up menu.
- Right-click the view and then choose Mark Slices in the pop-up menu.
You can then choose the range of image slices, and increment, that you want to mark in the Choose a Range dialog.

- Click the Marked Slice box for each key image that you need to create.
- Do the following to unmark slices or invert the current selection:
- Uncheck the Marked Slice box for each image slice that you need to unmark.
- Right-click inside the view and then choose Unmark All Slices in the pop-up menu.
- Right-click inside the view and then choose Invert Marked Slice Selection in the pop-up menu.
Image slices that are marked for interpolation are first removed from the dataset and then replaced by a linear weighted interpolation from adjacent slices. For example, if slices 4 and 5 are marked, slices 3 and 6 will serve as references. The data of slice 4 will be replaced by the data of slice 3 weighted by 2/3, summed to the data of slice 6 weighted by 1/3. The data of slice 5 will be replaced by the data of slice 3 weighted by 1/3, summed to the data of slice 6 weighted by 2/3.
You should note that if a marked slice is located at the beginning or end of the stack, its data will be replaced by the closest unmarked slice. This is done to preserve the shape of the dataset, including the number of slices, volume, spacing between slices, and so on.
- Mark the image slices that you need to interpolate (see Marking Image Slices).
- Right-click the image plane view of the marked dataset and then choose Simple Marked Slices Replacement in the pop-up menu.
Interpolation is applied automatically to the marked slices in the dataset.
- Save the modified dataset, as required (see Organizing and Saving Data).
In cases in which unrepresentative slices are present within a dataset, and interpolating is insufficient or not required, you can simply replace the current slice with a marked one.
- Mark the image slice that you want to copy (see Marking Image Slices).
- Scroll to the image slice that you want to replace.
- Right-click the image plane view of the marked dataset and then choose Copy Marked Slice to Current Slice in the pop-up menu.
The current slice is replaced with the marked one in the image stack.
- Save the modified dataset, as required (see Organizing and Saving Data).
In cases in which unrepresentative slices are present within a dataset, and interpolating or copying image slices is insufficient or not required, you can simply remove them. You should note that applying this operation will alter the shape of the dataset, in particular, the number of slices and its volume. You should also note that if this operation is applied to a time-enabled dataset, marked slices will be removed at each time step. For example, if you mark slice 20 in a time-enabled dataset with 3 time steps, then slice 20 will be removed at T1, T2, and T3.
- Mark the image slices that you need to remove (see Marking Image Slices).
- Right-click the image plane view of the marked dataset and then choose Remove All Marked Slices in the pop-up menu.
The marked slices are automatically removed from the dataset.
- Save the modified dataset, as required (see Organizing and Saving Data).
If required, you can extract new images from marked image slices. For example, to create a small data set for training a deep model
- Mark the image slices that you want to include in the new dataset (see Marking Image Slices).
- Right-click the marked dataset in the Data Properties and Settings panel and then choose New Image from Marked Slices in the pop-up menu.
The new dataset is created and appears in the Data Properties and Settings panel.
- Save the new dataset, as required (see Organizing and Saving Data).
